Unveiling Majorana quasiparticles by a quantum phase transition: Proposal of a current switch