My MySQL table country_phone_codes looks something like this
id country_code area_code name
---------------------------------------------------------
As you seem to want to select those rows, where the area_code is the same as country_code, you could just select those rows where area_code and country_code are equal:
SELECT country_code, name
FROM country_phone_codes
WHERE area_code = country_code;
If there is possibility that there are multiple rows with the same area code and country code, you can use DISTINCT to select only one row for each (country_code, name) tuple.
SELECT DISTINCT country_code, name
FROM country_phone_codes
WHERE area_code = country_code;