The case statement below should be retrieving data whenever CL.TYPE = DIAG.TYPE Then DIAG.TYPE is true and if not not then NULL. Does this make sense? Or Is this the most logical way to do this?
(CASE
WHEN CL.TYPE2 = DIAG.TYPE
OR CL.TYPE3 = DIAG.TYPE
OR CL.TYPE4 = DIAG.TYPE
OR CL.TYPE5 = DIAG.TYPE
OR CL.TYPE6 = DIAG.TYPE
OR CL.TYPE7 = DIAG.TYPE
OR CL.TYPE8 = DIAG.TYPE THEN SUBSTRING(DIAG.TYPE,2,1)
ELSE NULL
END)