I hope everything went better than you expected. I've had similar experiences where I didn't study and felt so unprepared, then someone who knew their stuff took over during the test. I've also had the opposite happen. This was all before I was diagnosed, but right around the time I'd started talking about my abuse to my first T. In one case that really upset me, I was taking a quiz where basically all I had to do was a bunch of trig to figure out the answer. I LOVE math and trig and was always top of my class...and I just stared at the problem, unable to figure out how to find the lengths of triangle sides, and couldn't even remember what sin, cos, and tan were. I tried to sketch a few diagrams, but even those didn't make sense. In the middle of it all, I started to get the most excruciating migraine (and I didn't get migraines before that). In retrospect, all I can figure is that that was someone popping out uninvited.
Anyway, I want to say I totally believe you can tackle this degree and all of the other stuff that's complicating life right now. It WILL get better. If I can get an advanced degree in engineering after spending 25+ years being artsy and hating science, your parts will learn to cooperate, too. Hang in there!