What you are taught when you learn how to drive is "always brake, never swerve". Which also happens to be exactly what a self-driving car would and should do in an emergency situation.
Reformulated as a trolley problem, this is: do not pull the lever.
Why? Because swerving will almost always put the car in more danger for itself and others, since it may cause the car to spin, or approach cars in incoming lanes or pedestrians on the footpath, or any number of bad things.
Since, by law, other cars must maintain a safe distance behind you, slamming on your brakes is always a safe response to an obstruction. Any other response, such as changing lanes, should be considered if it is safe or not. If it is unsafe, then you shouldn't do it, things like "busses of schoolchildren" is completely outside the parameters of the problem.
This whole self driving car issue took a wrong turn the day that someone had decided that they had the moral imperative to break the law in order to prevent crashes. You do not have that imperative yourself, you have the imperative to follow the law in order to prevent crashes. The reason that two drivers can pass each other at enormous speeds without prior communication is that the law forces them into their lanes. The law is the protocol that all drivers follow to interact, since they are unable to talk to each other and as soon as you break it, you expose yourself and others to untold danger. If the law says "don't leave your lane" and best driving practices says "don't swerve", then you don't swerve.