This is a strange data structure. You need a left outer join
with the conditions in the on
clause:
select a.id, a.name, a.city, b.attr_value
from table_A a left join
table_B b
on a.id = b.attr_id and b.attr_name = 'Attr_1' and b.attr_type = 'TableA';
I added the attr_type
condition, because that seems logic with this data structure.