----- Sorry i tryied your solution but it doesn't work
---- Look at following code
----- Also see the output
declare
v_var char(4) := 'Col1';
begin
declare
cursor c1 is select uomid,tomsrid,uomdesc from bduommst
order by to_number(decode(v_var,'Col1',1,'Col2',2,3),'0')...