Is there a way to sum rows only when they meet certain condition?, If they dont they must be copied to the new table. For example, if i have this table

```
| id | A | B |
--------------
|  1 | a | 2 |
|  1 | b | 4 |
|  1 | c | 1 |
|  2 | a | 4 |
|  3 | a | 1 |
|  3 | b | 5 |

```

I want an output like this

```
| id |  A  | B |
--------------
|  1 | a,b | 6 |
|  1 |  c  | 1 |
|  2 |  a  | 4 |
|  3 | a,b | 6 |

```

It will only sum if column 'A' is 'a' or 'b', it will just copy the value if its 'c'