Selective mutism is when someone talks in some situations, such
as at home or with their best friends, but can't talk in others,
like at school, due to anxiety.
You can get more information on wikipedia's selective mutism
article and at selective mutism.com.
Hope this helps!