SELECT
table1.поле1,
table1.поле2,
table1.поле3,
user1.login AS login1,
user2.login AS login
FROM `таблица1` AS table1
LEFT JOIN `users` AS user1 ON user1.id = table1.поле2
LEFT JOIN `users` AS user2 ON user2.id = table1.поле3
WHERE table1.поле4 = '10';