Sugiero siempre agregar alias a tablas y columnas. Así estará seguro de qué datos se seleccionan.
select
T1.somedata,
T1.somedata1,
T2X.name as XName,
T2Y.name as YName
from T1 as T1
inner join T2 as T2X on T2X.id = T1.X
inner join T2 as T2Y on T2Y.id = T1.Y