Your best bet is to check for what you are looking for and then, if it isn't there, try a Random function to determine where to go from there.
Handy resources:
Random: random() - Arduino Reference
Switch: http://arduino.cc/en/Reference/SwitchCase#.UwQDePldV9U
if...else: http://arduino.cc/en/Reference/Else#.UwQDevldV9U
int min = 1;
int max =6;
if (button1State == LOW) {
digitalWrite(ledPin, HIGH); // turn the LED on
} else {
int var = random(min,max);
switch (var) {
case 1:
//do something when var equals 1
break;
case 2:
//do something when var equals 2
break;
default:
// if nothing else matches, do the default
// default is optional
}
}
Hope this helps!