Selective mutism explained by someone who experienced it as a child

I remember for whatever reason around 1st 2nd grade I would always have these panic attacks and would want to puke, I would always get a gag feeling but when I got to school everything was fine, it sparked up again later around 4th. Never really found out why