Hi everyone,
i want use if condition within case statement so, how can i use?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Asad AliRank #1,139 · 1.6K reputationPosted Jun 17, 2016, 11:03 PM EDT
Nirav DaraniyaRank #593 · 4.1K reputationPosted Jun 18, 2016, 1:26 AM EDT
Vinay SinghRank #604 · 4K reputationPosted Jun 18, 2016, 3:34 AM EDT
SELECT CASEWHEN -1 < 1 THEN 'TRUE'
ELSE 'FALSE' END AS Result
GO
-- SQL Server 2012 solutionSELECT IIF ( -1 < 1, 'TRUE', 'FALSE' ) AS Result;
GO