I want to retrieve the columns from the table., depending on the conditions., what I can use.
For example, I' ve fields namely, add order comments, cancel order comments, postpone order comments, action(add, cancel, postpone) and amount received(Y/N)
Now I've to fetch columns add order comments, cancel order comments, postpone order comments depending on action and amount received.,
if(action='add' and amount received='Y')
then
i've to fetch add order comments column
elseif(action='postpone' and amount received='Y')
then
i've to fetch postpone order comments column
else (action='cancel')
then i've to fetch cancel order comments
how to get this done in sql or plsql., I want this conditions in select statement