La solución se encontraba en trabajar con tablas pivote.
Dejo el fiddle de la solución:
Fiddle, solución a problema
-- Crear Tabla
create table historico (cuenta int,valor decimal(20,2),mes int,anio int, empresa varchar(30));
-- Insertar Datos
INSERT INTO historico VALUES (110505, -5173740.00, 1, 2017, "SERVICIOS S.A.S");
INSERT INTO historico VALUES (110505, 0.00, 2, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 3, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 4, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 5, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 6, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 7, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 8, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 987444.60, 9, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 10, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 11, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110505, 0.00, 12, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 700000.00, 1, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 2, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 3, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 4, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 5, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 6, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 7, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 8, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 9, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 10, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 11, 2017, 'SERVICIOS S.A.S');
INSERT INTO historico VALUES (110510, 0.00, 12, 2017, 'SERVICIOS S.A.S');
-- Solución:
SELECT
cuenta,
MAX(CASE WHEN mes = 1 THEN valor ELSE '' END) AS enero,
MAX(CASE WHEN mes = 2 THEN valor ELSE '' END) AS febrero,
MAX(CASE WHEN mes = 3 THEN valor ELSE '' END) AS marzo,
MAX(CASE WHEN mes = 4 THEN valor ELSE '' END) AS abril,
MAX(CASE WHEN mes = 5 THEN valor ELSE '' END) AS mayo,
MAX(CASE WHEN mes = 6 THEN valor ELSE '' END) AS junio,
MAX(CASE WHEN mes = 7 THEN valor ELSE '' END) AS julio,
MAX(CASE WHEN mes = 8 THEN valor ELSE '' END) AS agosto,
MAX(CASE WHEN mes = 9 THEN valor ELSE '' END) AS septiembre,
MAX(CASE WHEN mes = 10 THEN valor ELSE '' END) AS octubre,
MAX(CASE WHEN mes = 11 THEN valor ELSE '' END) AS noviembre,
MAX(CASE WHEN mes = 12 THEN valor ELSE '' END) AS diciembre
FROM
historico
WHERE anio = 2017 AND mes BETWEEN 01 and 12
GROUP BY cuenta
Muchas gracias.
SUM
no tiene nada mas que sumarle y devolverá ese valor @JuanD