If you want autonomous cars outside in the real world (as opposed to artificial lab and test scenarios), then they have to deal with real world situations. This situation has happened in reality. You don’t need to ask about odds anymore.
how can the car know which situation it’s currently in?
That is an engineering question. A good one. And again one of these that should have been solved before they let this car out into the real world.