Love and hate him

There is this guy in my class who I have been talking to over text for nearly a year now. We occasionally speak in person too. Well I kinda have a crush on him right now but I don't want to like him. He is so bipolar because sometimes he is such a nice guy and the other times he is such a douchebag that I just want to punch him in the face. I hate that I like him and I don't know what to do, please help me.

P.S we are very open with each other over text