I got a little bit further to the desired solution:

With:

=IF(B4='Database'!A2:A88;IF('Database!'B2:B88="Yes";"'Database'!B1;'Database'!B1);"")

In this case I somehow have the same output for False and True, but it seems to show if the first GHS-hazard-symbol can be handled in the first room.
The problem is, that I get a list with Room 1 and a lot of blank cells which leads to a overflow in the box...