I have a case statement that is as follows:
CASE id
WHEN '9FDAC41CBF5ED6E3758' THEN 'Invalid'
WHEN '5EBF056B16E7593' THEN 'Invalid'
WHEN 'EEDC43399D10F44A19E293BB' THEN 'Invalid'
WHEN '2322' THEN 'No'
ELSE 'Yes'
END AS [Test]
Is it possible to put the 3 when clauses in 1 when clause since they are essentially returning the same value?
Yes. See below.
You could also use
IN