select * from student
where classID=1 and StudentID=2
union all
select * from student
where classID=3 and StudentID=3
union all
select * from student
where classID=2 and StudentID=3
where classID=1 and StudentID=2
union all
select * from student
where classID=3 and StudentID=3
union all
select * from student
where classID=2 and StudentID=3
select * from student where (classID = col1 and StudentID = col2)