In a query, I have a column like this:
case when X = 1 then
case when Y <> 0 then YY else XX end
else ZZ
end as MyColumn
Is there a way, in another column, to check the above column value referencing MyColumn
instead of rewriting the case statement?
I should value another column based on the MyColumn
value.
Thanks