My requirement is to get a number from a complex query and check if the num = desiredNum.
If it is equal to desiredNum, then I must perform another set of select statements,
Is there any way I can achieve this in a query rather than writing a function?
Eg:
select case when val =2
then select val1 from table1
else 'false'
from (select val from table)
Is this possible ??