Its unclear what sort of output you are expecting but I think you need to investigate the different join types
See
T-SQL Join Types | T-SQL content from SQL Server Pro
Also you get to be clear on your script where field name are common that the correct table field name is used.
eg
Select a.id, b.UID, x,y from table1 a left join table2 b on a.id = b.id left join table3 c on b.UID = c.IUD