You could assign points.
example:
Your bot is o, and it's currently the bots turn.
x.x
...
.o.
highlighted in bold is a spot where your opponent could place his x next turn to win, so lets upgrade that amount of points
point table(most useful has highest number, 2 points are given for blocking a possible win for the opponent, and 1 point is given for opening up a win opportunity for yourself.)
030
010
101
so the bot picks the highest scored spot
xox
.x.
.o.
opponent places it in the centre...
new scoretable:
000
000
303
ah, two times 3 points he wins!
another example, where it would be a tie:
x.x
...
o..
020
000
011
xox
.x.
o..
000
000
012
xox
.x.
oxo
000
000
000
doesnt matter where it places it, coz it's a tie
could assign 3 points to blocking opponent, 2 to opening up a win situation for yourself, 1 for every possible move and 0 for not possible.