Im trying to use case to vary the value im checking in a where clause but I'm getting the error:
incorrect syntax near the keyword 'CASE'
SQL Server 2005
select *
from table
where ((CASE when adsl_order_id like '95037%'
then select '000000'+substring(adsl_order_id,6,6)
ELSE select adsl_order_id
END)
not in (select mwebID from tmp_csv_dawis_bruger0105)