I had to go to school (I had no choice - I was made to go to school)
or
I must have gone to school (this has a different sort of meaning. 'I must have' doesn't mean that you were forced to do something, it means that surely you did something that might be a bit doubtful. eg I don't remember anything about it but I must have gone to school as all the other children
...or I was to go to school; I was told to go to school; I should go/have gone to school; I knew/they told me how important it was to go/that I go to school...
I would leave 'had to' for what 'I didn't want to do'...