select pd.id
,[value 1] = Case
----
End
,[value 2] = Case when [value 1] in ('test1', 'test2') Then 0
else [value 1] End
I am getting as invalid column when I try to use value 1 in value 2. Is there a possibility to use calculated [value 1] to be used in [value 2]
My current solution is to create a separate sp or view for value 1 but that's not what I want to do.