Try this:
CASE WHEN table3.col3 IS NULL THEN table2.col3 ELSE table3.col3 END as col4
The as col4
should go at the end of the CASE the statement. Also note that you're missing the END
too.
Another probably more simple option would be:
IIf([table3.col3] Is Null,[table2.col3],[table3.col3])
Just to clarify, MS Access does not support COALESCE. If it would that would be the best way to go.
Edit after radical question change:
To turn the query into SQL Server then you can use COALESCE (so it was technically answered before too):
SELECT dbo.AdminID.CountryID, dbo.AdminID.CountryName, dbo.AdminID.RegionID,
dbo.AdminID.[Region name], dbo.AdminID.DistrictID, dbo.AdminID.DistrictName,
dbo.AdminID.ADMIN3_ID, dbo.AdminID.ADMIN3,
COALESCE(dbo.EU_Admin3.EUID, dbo.EU_Admin2.EUID)
FROM dbo.AdminID
BTW, your CASE statement was missing a ,
before the field. That's why it didn't work.