Testing?

I need to test if three symbols are the same its a tic tac toe style of game and I relaly cant get it to work properly Im going to end up with one big nasty if statement and I was hoping I could get away from that