Decode/ Case Issue
I have a table A having following definition:
A_ID number
A_Name varchar
A_Prnt_ID number
A_Code varchar
I have to write a SQL statement with the following logic:
If A_Code = 'ABC' ,then query must return A_name of A_Prnt_ID, else it must return the A_name of A_ID
How do we implement this?? Neither CASE nor DECODE will work I believe.
Thanks in advance!