Let us consider a situation, which for all intents and purposes we shall ignore the probability of such situation occurring. We should also look to approach the situation simply as a thought experiment that we are able and capable of discussing rather than having to assign a prerequisite 'worldly value' to the situation.
Of course, there is no obligation to answer the question from this situation...
You sit in a room which the ceiling, floor and walls are made of concrete, except two windows that exist one each at east and west. Through each window you can see another concrete-lined room. And in each room, there is a person.
To your east you see your parent (you are free to choose which). To your west you see a little child (you are free to assign a gender) which you have never seen up until this very moment.
Both are strapped to iron alloy chairs. Their hands, legs and head are cuffed to the chair by tungsten brackets such that motion is virtually impossible. They also each bear a headband that contains electrodes that will deliver a current to the brain strong enough to instantly kill the individual. These electrodes activate by the buttons you have in your hand.
This is the work of an twisted captor. He announces to you that you have a minute to decide who to electrocute and you are forced to pick either your parent or the child. If the minute passes without any button pressed, a toxic gas (we can go with carbon monoxide) will enter the rooms and will certainly kill the parent and child. Whichever route happens, you are then free to leave, (along with the individual you may have saved).
Which room do you electrocute?
What if I changed the situation: the minute passes without any button pressed; the toxic gas will enter your room instead of the others. Does your action changes?