How to rotate an object based on angles?

Actually I’m using a scale in that scale I want to rotate based on angles The output should be like this I tried many logic but its not coming someone please help me regarding this

transform.Rotate will do