Head rotation without moving the characters body.

Hello, I was wondering if there was a way to rotate a characters head 90 degrees both left and right without moving the character body once past the 90 degree mark. So after the 90 degree mark he head just goes back facing straight. And is it also possible to only do this in the idle position?

I’m very new to this and, Thank you!