I suppose you want a solution that doesn't require you to normalize your 6 audit columns, like they should be?SELECT p.Name + CASE WHEN P.ID=F.AUDIT6 THEN '(6)' WHEN P.ID=F.AUDIT5 THEN '(5)' WHEN P.ID=F.AUDIT4 THEN '(4)' WHEN P.ID=F.AUDIT3 THEN '(3)' WHEN P.ID=F.AUDIT2 THEN '(2)' WHEN P.ID=F.AUDIT1 THEN '(1)' ENDFROM Person P INNER JOIN AuditFile F ON P.ID=COALESCE(F.AUDIT6,F.AUDIT5,F.AUDIT4,F.AUDIT3,F.AUDIT2,F.AUDIT1)
Warning: not tested.If you can't redesign the AuditFile table to put the IDs in a single column, you can create a view that UNIONs the 6 columns into one and join that instead. Still not ideal but makes this query a little easier.edit: added missing END keyword to CASE expression