Ervan uitgaande dat u NULL
. in overweging neemt hetzelfde zijn (terwijl SQL Server dat niet doet):
SELECT
d1.col1, d1.col2, d1.col3, d1.col4,
d2.col1, d2.col2, d2.col3, d2.col4,
[RESULT] = CASE
WHEN (d1.col2 = d2.col2 OR (d1.col2 IS NULL AND d2.col2 IS NULL))
AND (d1.col3 = d2.col3 OR (d1.col3 IS NULL AND d2.col3 IS NULL))
AND (d1.col4 = d2.col4 OR (d1.col4 IS NULL AND d2.col4 IS NULL))
THEN 1 ELSE 0 END
FROM ABC.dbo.tbl_123 AS d1
FULL OUTER JOIN
XYZ.dbo.tbl_123 AS d2
ON d1.col1 = d2.col2;