I dumped water on my toddler
Why would you pour water on your kid?
I wanted him to use the toilet and he refuses to so I taught him a lesson.
It's wrong to hurt an innocent child like this.  Your toddler will not understand how to use the toilet as a result, but will be severely traumatized by your actions.
He will learn eventually and for now he'll piss himself until he gets it right.
Children do not learn by being abused and you dumping water all over your kid is aggressive and abusive. Sit down and help your child understand how and why they should use the toilet instead of trying to force it into them.