• Here is one option. I used a special qualifier of the CONVERT() function to get the correct binary value out of the VARCHAR value in the first table.

    with

    Table1 as

    (select ID_VARCHAR = 'D19377322B06194DB6A9B34667D506A6'),

    Table2 as

    (select ID_BINARY = cast(0xD19377322B06194DB6A9B34667D506A6 as binary(16)),

    ID2_NVARCHAR = cast('{E867D837-EB0C-4EDB-B56E-D7083C181E52}' as nvarchar(40))),

    Table3 as

    (select ID2_GUID = cast('E867D837-EB0C-4EDB-B56E-D7083C181E52' as uniqueidentifier))

    select

    *

    from

    Table1 inner join

    Table2 on convert(binary(16), Table1.ID_VARCHAR, 2) = Table2.ID_BINARY inner join

    Table3 on convert(uniqueidentifier, Table2.ID2_NVARCHAR) = Table3.ID2_GUID