Perl, 76 char
sub W{$n=$u=0;map{$n++;$u|=$_[$_-$n]&$_[$_]&$_[$_+$n]for/./g}147,4,345,4;$u}
There are three ways to win horizontally:
0,1,2 ==> 1-1, 1, 1+1
3,4,5 ==> 4-1, 4, 4+1
6,7,8 ==> 7-1, 7, 7+1
One way to win diagonally from lower left to upper right:
2,4,6 ==> 4-2, 4, 4+2
Three ways to win vertically:
0,3,6 ==> 3-3, 3, 3+3
1,4,7 ==> 4-3, 4, 4+3
2,5,8 ==> 5-3, 5, 5+3
One way to win diagonally from upper left to lower right:
0,4,8 ==> 4-4, 4, 4+4
Read the middle columns to get the magic numbers.