How about
for(int value = 0; value <=7; value++){
digitalWrite(muxS1, bitRead(value, 0));
digitalWrite(muxS2, bitRead(value, 1));
digitalWrite(muxS3, bitRead(value, 2));
}
That will set the three pins to the state described by the lower three bits in the value number. With the loop, it will cycle through all the outputs of your demux.