select t1.workflowid as id,
min(t1.value) as value1,
max(t2.value) as value2
from the_table t1
join the_table t2
on t1.workflowid = t2.workflowid
and t1.value <> t2.value
group by t1.workflowid
This assumes that there are always exactly two rows present in the table. If this is not the case, you will indeed lookup the PIVOT
operator (search for it, there are tons of questions for that on SO)
SQLFiddle: http://www.sqlfiddle.com/#!3/97e8b/2