No, it's very unlikely to be caused by an electrical problem.
Switching between drill and hammer action is achieved by a mechanical linkage between the selector knob and the gears. If yours is now stuck in drill only mode then something's probably come adrift in the mechanical linkage in the gearbox.
But if the drill no longer runs and the selector won't move then it's possible that it might have jammed the motor and also caused something to burn out in the electronics.