It could be done with relays
You will need 1 per sensor
Only light B needs any logic, so you Only need a single pole relay for each sensor.
You need to be mindful of the loading and rating of relay contacts
This is probably beyond the scope of a DIY project, I would suggest you involve a local electrician.
Rcd and other circuit protection needs to be considered also.