'select * from (select top '+ Cast(@num1 as nvarchar(100)) + ' percent * from test where testCourse=''ccjxtjc'' order by newid())a union all
select * from (select top '+ Cast(@num2 as nvarchar(100)) + ' percent * from test where testCourse=''dyjxl'' order by newid())b union all
select * from (select top '+ Cast(@num3 as nvarchar(100)) + ' percent * from test where testCourse=''qtks'' order by newid())c union all
select * from (select top '+ Cast(@num4 as nvarchar(100)) + ' percent * from test where testCourse=''rjbf'' order by newid())d union all
select * from (select top '+ Cast(@num5 as nvarchar(100)) + ' percent * from test where testCourse=''smyxl'' order by newid())e union all
select * from (select top '+ Cast(@num6 as nvarchar(100)) + ' percent * from test where testCourse=''yjwxjs'' order by newid())f)h'