Can someone help me with my arduino and relay and switch?
Maybe it's not the only problem, but at least:

int val = ...


and 

if (val == "FLUSH")


do not match.

I assume you mean a digit here (0 or 9 to flush)?

Also, you should put your circuit in your question. A reason because of the 'flipping' is that your switch is not pulled down, and it results in undefined behavior.

Another thing you could add is debouncing, when a switch is clicked, it results in multiple 0/1 and 1/0 transitions (although your delay might help too).