Sesuatu seperti
SELECT *
FROM notificationTable notification
LEFT JOIN commentTable comment
ON (notification.typeID = comment.ID AND notification.type == 'comment')
LEFT JOIN evenTable event
ON (notification.typeID = event.ID AND notification.type == 'accept')
WHERE notification.userID = 2
Tapi saya sangat menyarankan untuk mendesain ulang sistem Anda untuk menghindari hubungan polimorfik...