Hi ,
I have query with order by clause having customised column using case statement , when this column is used on order by clause , its showing error 'Invalid Column in the context' .

If I try to use the entire case statement in the order by clause it's working fine, the problem i have using this solutions is performance degrade.Even this customised columns have reference columns as well.
Please anyone could suggest...