I don't know a lot about the Win32::ODBC module, but I normally use DBI along with DBD::ODBC to connect to ODBC-databases (works fine and is more portable).
Then I should use $dbh->quote.
With DBI, the code would look something like:
$SQL = "SELECT * FROM st WHERE st_name=".$dbh->quote($name);