Question : Reading in and set  value in stored procedure

I have a parameter passed in to a stored procedure. I need to check the first 4 characters if they are = to 'abcd' I need to set another variable to 'defg' and vice versa I tried this with a case statement but couldn't get it too run. Any ideas?    

Answer : Reading in and set  value in stored procedure

SELECT @var = CASE WHEN LEFT(@param, 4) = 'abcd' THEN 'defg' ELSE @param END
Random Solutions  
 
programming4us programming4us