I would try UNION
SELECT * FROM TabA JOIN TabY ON(X.id1 = Y.id1)
UNION
SELECT * FROM TabA JOIN TabY ON(X.id2 = Y.id2)
UNION
SELECT * FROM TabA JOIN TabY ON(X.id3 = Y.id3)
Now, my requirement is like: I want if the 1st join condition is true,
then the rest two join conditions on id2 & id3 will be discarded.
Similarly if the 2nd join condition on id2 is true, then the rest of
the join conditions on id1 & id3 will be discarded and so on.
I don't think this condition matters. How would the result set be different? If any of the conditions are true, the row will be included once because of the way SQL creates the result set. UNION will make SQL get the result set for the 3 queries then combine them and remove things with the same primary key.
The other reason I don't think it matters is depending on the optimizer in your SQL engine, it'll "short circuit" the OR chain as soon as one matches, which would fulfill your requirement. This is dependent on both the SQL flavor and the exact query and optimizer.
You may also be able to use your ON(... OR ... OR ...)
with a SELECT DISTINCT