USE NORTHWIND;
GO
SELECT SHIPCOUNTRY,[ORDERS_ID] =
CASE ORDERID
WHEN ORDERID = 10300
THEN 'I AM FROM 10300'
WHEN ORDERID = 10400
THEN 'I AM FROM 10400'
WHEN ORDERID = 10500
THEN 'I AM FROM 10500'
ELSE 'I AM OUT OF RANGE'
END
FROM ORDERS;
GO
Error - Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '='.
If you have northwind Database in your sql server,you can execute this query.
I don't understand where the issue is.Can anyone help me to resolve this issue?