Aggregating some rows value in a new column with rules


I have one table containing these rows

DataCombo, DataElement, DataValue
ComboCode1, DataElement1, 1
ComboCode2, DataElement1, 3
ComboCode3, DataElement2, 5
ComboCode4, DataElement2, 7
ComboCode5, DataElement3, 9

I have some rules that tell that :

[Value of (ComboCode1, DataElement1) + Value of (ComboCode2, DataElement1)] = Value of DataElement4
[Value of (ComboCode3, DataElement2) + Value of (ComboCode4, DataElement2)] = Value of DataElement5
[Value of (ComboCode5, DataElement3) = Value of DataElement6

I would need for this purpose to build one table with this layout:

DataElement, DataValue
DataElement4, 4
DataElement5, 12
DataElement6, 9

Knowing the rules I have.

What should be the best way to realize this ?

Thanking you in advance for your help.

Best regards

From what I can understand, you just sum the values of DataValue column of two consecutive rows? Is this correct, or you have just picked up an example that makes it look like this?