Servo Motor

AOA...
this is my 1st post in "arduino.cc"
i need a code for servo motor that rotates in specific three angles...
At 1st level the angle of rotation is 60 degrees...
2nd level rotation is 120 degrees
3rd level rotation is 180 degrees....
completed my mechanical work for my project but needs code to run my project...... :astonished: :astonished: :astonished: :astonished: :astonished:

Servo servo (pin) ;

void loop ()
{
  if ( ???? )
    servo.write (60) ;
  if ( ???? )
    servo.write (120) ;
// etc etc

What have you tried based on the good suggestion from @MarkT ?

...R