I don't know if I am framing the question correctly but let me summarise the problem by giving an example.
SELECT *
FROM EMPLOYEE
WHERE EMPLOYEE.TYPE IN ('CEO', 'MANAGER', 'LEAD', 'DEVELOPER')
Here you can see that all the rows will be returned where the values fall inside the mentioned values.
What I want is that if 'CEO' exists in the table, return the records with CEO only. If not, then return the records with 'MANAGER' and so on.
Based on a sequencing logic, only one record should be returned (based on availability).
Also this is a part of a larger SQL query so if there's a solution where this can be achieved in a single line or two will be helpful.