select 5 theory Question from chapter 'abc'
to achive task note following things
1. To make a join your table1 and table2 should have at least one unique column, in your case it may be 'chapter'
2. use
newid() in build function to get random records
//random 5 theory Question from chapter 'abc'
select Top 5 * from Table2 where Chapter ='abc' order by newid()