I have a table which contains Caste and Marks field upon which I want to build Query criteria. The Caste field contains GENERAL, OBC, SC, ST records entered as applicable and marks field contains marks out of 100. Now I want to build a query which pulls all records from the table who fulfills following criteria :-

FIELD - CASTE FIELD - MARKS
GENERAL >= 50% of 100
OBC >= 50% of 100
SC >= 45% of 100


ST >= 45% of 100
Note:- >= condition to be applied in Marks field.

The above criteria should be combined in one single Query/SQL statement to pull all the records at once meeting above condition. I also want to make separate list of each Caste meeting above conditions.Please help.