मुझे लगता है कि आप case when then
नीचे के रूप में वाक्य रचना:
SELECT CASE WHEN player1id = 1 THEN player2id ELSE player1id END
FROM players WHERE player1id =1 OR player2id=1;
वैकल्पिक रूप से:
SELECT CASE WHEN player1id = 1 THEN player2id WHEN player2id =1 THEN player1id END
FROM players WHERE player1id =1 OR player2id=1;