LEFT JOIN DEFAULT NULL VALUE
If I understand correctly, you could have any number of columns from table B? If so, then you will need to dynamically create the SQL statement (by querying the information_schema table) and just wrap each column from B in your ifnull(field, ifnullvalue).