I feel this is too crude, but should work:
Working Example @ MySQL Fiddle
select
max( case row_num when 1 then v else null end ) as V1
, max( case row_num when 1 then a else null end ) as A1
, max( case row_num when 1 then n else null end ) as N1
, max( case row_num when 2 then v else null end ) as V2
, max( case row_num when 2 then a else null end ) as A2
, max( case row_num when 2 then n else null end ) as N2
, max( case row_num when 3 then v else null end ) as V3
, max( case row_num when 3 then a else null end ) as A3
, max( case row_num when 3 then n else null end ) as N3
, max( case row_num when 4 then v else null end ) as V4
, max( case row_num when 4 then a else null end ) as A4
, max( case row_num when 4 then n else null end ) as N4
, max( case row_num when 5 then v else null end ) as V5
, max( case row_num when 5 then a else null end ) as A5
, max( case row_num when 5 then n else null end ) as N5
from (
SELECT
SUM(CASE WHEN p.state =0 THEN 1 ELSE 0 END ) AS v
, SUM(CASE WHEN p.state =1 THEN 1 ELSE 0 END ) AS a
, SUM(CASE WHEN p.state =2 THEN 1 ELSE 0 END ) AS n
, @row_num := ( @row_num + 1 ) as row_num
FROM
( select @row_num := 0 ) row_nums
, cia_ensures ce
LEFT JOIN policies p
ON ce.id = p.cia_ensure_id
AND p.policy_business_unit_id =1
WHERE ce.id IN (1,2,3,4,5,6,7,8,9,11,13)
GROUP BY ce.id
) pivot_results;
Output is:
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
| V1 | A1 | N1 | V2 | A2 | N2 | V3 | A3 | N3 | V4 | A4 | N4 | V5 | A5 | N5 |
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+
| 2 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+