 |
 |
Case When Then Else in SQL SERVER
If you want to use If Then Else in SQL query you can use CASE:
SELECT CASE
WHEN empid='1' THEN 'Admin'
WHEN empid='100' THEN 'Director'
ELSE 'Employee'
END as positiontitle
FROM employee
|
Please tell me if it can help you :)
| Comment no. 2 |
From Date 27/09/50 Time 16.13 [203.101.40.53]
|
|
 |