Converting mysql to $wpdb

You can query INFORMATION_SCHEMA and achieve the same:

function getEnumValues($table, $field)
  {

    global $wpdb;

    $result = $wpdb->get_row("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '" . DB_NAME . "' AND TABLE_NAME = '" . $table . "' AND COLUMN_NAME LIKE '" . $field . "'");

    if($result === FALSE) {
      die($wpdb->last_error); 
    }

    // this is the column name
    $result->COLUMN_NAME;

}