I have a query like
select * from emp where emp.id in(1,2,3) and emp.sal>10000
I need to add a logic to the check emp.sal>10000 only if design.type='Labor', I tried like the below but not working
select * from emp,design where emp.id in(1,2,3) and case when design.type='Labor' then emp.sal>10000
Can we implement this ?