Du vill ha flera left join
s, betingat av typen. Jag tror ungefär så här:
SELECT e.*,
COALESCE(h.name, f.name, c.name, r.name) as name
FROM events e LEFT JOIN
holidays h
on h.id = e.reference_id AND
e.topic_type = 'holiday' LEFT JOIN
fundays f
on f.id = e.reference_id AND
e.topic_type = 'funday' LEFT JOIN
cruises c
on c.id = e.reference_id AND
e.topic_type = 'cruise' LEFT JOIN
recruitment r
on f.id = e.reference_id AND
e.topic_type = 'recruitment'
WHERE e.event_id = 1