Просто джойнишь таблицу саму с собой и для каждой "таблицы" в where пишешь
field_name = 'longitude'
и
field_name = 'latitude'
select
lng.object_id,
ltd.value as latitude,
lng.value as longitude
from obj_table lng, obj_table ltd
where lng.field_name = 'longitude'
and ltd.field_name = 'latitude'
and lng.object_id = ltd.object_id
;
см. пример на dbfiddle
UPDATE:
еще можно так:
select
object_id,
max(case field_name when 'latitude' then value else null end) as latitude,
max(case field_name when 'longitude' then value else null end) as latitude,
max(case field_name when 'category' then value else null end) as category
from obj_table
group by object_id;
или еще...
собрать строки в json, а затем извлечь обратно нужные поля...
-- собираем в json:
select
object_id,
cast(replace(group_concat(json_object(field_name,value)),'},{',',') as json) json_obj
from obj_table
group by object_id
;
-- или так:
select
object_id,
cast(concat('{',group_concat( concat('"',field_name,'":"',value,'"') separator ',' ), '}') as json) as json_obj
from obj_table
group by object_id
;
-- извлекаем поля из json:
select
object_id,
json_extract(json_obj,'$.latitude') as latitude,
json_extract(json_obj,'$.longitude') as latitude,
json_extract(json_obj,'$.category') as category
from (
select
object_id,
cast(replace(group_concat(json_object(field_name,value)),'},{',',') as json) json_obj
from obj_table
group by object_id
) t
;
см. пример на dbfiddle
PS: JSON работает начиная с версии 5.7