You are generating random numbers between 1 and 10, right?
Then you only need to handle these cases( 1 - 10 ), because you are not going to have any other value, right?
and if you want to combine cases you can do the following:
//the generated random number is stored in x
if ( winningline == winningline == winningline == x )
switch( x )
//the response you write here will be applied to 1, 2, 3, and 4
//and so on for other cases