How to change an image after it turned 90 degree

I am rotation A cylinder and want to change it when is has turned to the other side
I am using the code
transform.Rotate(new Vector3(30, 0, 45) * Time.deltaTime);

you can use like
if rotation axis is this then this like ranged
like 0 to 90 1st image
91 to 180 2nd image like this

if you tell me on which axis you want then i can try to code