Is it possible to use a Case statement in a sql From clause. For example, I'm trying something like:
SELECT Md5 FROM CASE WHEN @ClientType = 'Employee' THEN @Source = 'HR' WHEN @ClientType = 'Member' THEN @Source = 'Other' END CASE WHERE Current = 2;
Edit: Using SQL 2005