Selective mutism
~noun
Entry: a communication disorder in which an individual is able and willing to talk in some environments (at home, with friends), but is willing to talk in others.
@ Milton-Kindersley Advanced Dictionary