I can relate to that, definitely. I absolutely tanked every math test I ever took, even if I knew the work and got perfect scores on the class and homework, I just couldn't do the tests. Most other subjects I was ok, because a lot of it was so ingrained it was automatic, but math...ugh. Many of my math teachers over the years thought I was an idiot and cheating on my regular work, they just don't understand what it is to have anxiety.
Since I'm an artist I obviously excelled in art class throughout my entire school years. I also did very well in math and science but stopped after I finished Trig and Physics to focus on getting more art classes that were available.