Please take a look at this and let me know the possible solution?
Data to be shown from the table:
select a,b,d,e from table xyz.
- when c is null show d with value
or
- when c is not null show e with value
Data required:
Data looks like this
a b c d e
1 2 null 2
1 2 not null 2
From the above data, if c is null, display d = b else e = b.
How to write a proper SQL query for the above conditions, as I tried case it is not working.
Thanks in advance.