• Becareful following the CASE statement syntax in the examples provided in the article. A string enclosed in quotation marks used as a column alias for an expression in a SELECT list is on the depreciation list for future versions of SQL Server:

    'string_alias' = expression

    The Microsoft depreciating list, http://msdn.microsoft.com/en-us/library/ms143729.aspx

    Mitigation

    Rather use AS to alias the CASE expression.

    SELECT Name,

    CASE Barks

    WHEN 'True' THEN 'Ruff Ruff'

    ELSE CaseType

    WHEN 'Cat' THEN'Meow'

    WHEN 'Snake' THEN'Hiss'

    WHEN 'Pig' THEN'Oink'

    WHEN 'Monkey' THEN'Eek Eek'

    ELSE ' '

    END

    END AS Sound

    FROM Pets;