Jika saya mengerti dengan benar, inilah yang Anda cari:
SELECT id, summary, owner, c1.value, c2.value
FROM ticket t
INNER JOIN ticket_custom c1 ON t.id = c1.ticket AND c1.name = 'X'
INNER JOIN ticket_custom c2 ON t.id = c2.ticket AND c2.name = 'Y'