Two control signals one GPIO

This is indeed a way to know. I was trying to make out a solution with a MOSFET. I think I would need to use a PMOS. just need to figure out the configuration