select a single val though a table in wordpress

Use the method get_var() instead. I’ve also tidied up your code (if you’re gonna use double quotes, take advantage of them!) & added data escaping with the handy prepare() method.

global $wpdb;

$cat_id = $wpdb->get_var(
    $wpdb->prepare(
        "SELECT category_id FROM {$wpdb->prefix}awpcp_categories WHERE category_name = %s",
        $ad_cat
    )
);