insert TableName (ID)
select * from ( select top 5 QID
from Questions
where Categoryid='001'
order by newid()
) a
union all
select * from ( select top 10 QID
from Questions
where Categoryid='002'
order by newid()
) b
union all
select * from ( select top 15 QID
from Questions
where Categoryid='003'
order by newid()
) c