Вы можете использовать условное агрегирование и join
:
select t.*,
switch(cnt_102 > 0 and cnt_103 > 0, "Reg 102 and 103",
cnt_102 > 0, "Reg 102 only",
cnt_103 > 0, "Reg 103 only",
1=1, "Neither"
) as reg_102_or_103
from t left join
(select t.[inspection id],
sum(iif([regulation for non-compliance] like "*Reg102*", 1, 0)) as cnt_102,
sum(iif([regulation for non-compliance] like "*Reg102*", 1, 0)) as cnt_103
from t
group by [inspection id]
) as tt
on t.[inspection id] = tt.[inspection id]