Merging two rows into one by creating two new columns based on criteria from same table (SQL)
Here is one way:

SELECT name, year, quarter, type, coalesce(x_score, y_score) score, x_score, y_score 
FROM (
   select name, year, quarter, min(type) type
      , min(case when type='x' then score else null end) x_score
      , min(case when type='y' then score else null end) y_score
   from t1
   group by name, year, quarter
);


Using this setup data:

drop table t1;
create table t1 (name varchar2(1), year number(4), quarter Varchar2(2), type varchar2(1)
   , score number(3));
insert into t1 (name, year, quarter, type, score) values ('a',2016,'Q1','x',40);
insert into t1 (name, year, quarter, type, score) values ('a',2016,'Q1','y',50);
insert into t1 (name, year, quarter, type, score) values ('b',2016,'Q1','x',40);
insert into t1 (name, year, quarter, type, score) values ('a',2017,'Q1','x',40);
commit;
select * from t1;