I have the following table: 

```

| id | product_id | price   |  group  |
| 1  | 123123     |   100   |   1     |
| 2  | 123123     |   200   |  d845f  |
| 3  | 91123      |   150   |   1     |
| 4  | 2131238    |   100   |   1     |
| 4  | 5678689    |   250   |   1     |

```

So I want to select all prices where group is `IN (1, 'd845f')`. For some of them there is only one row output, like 

```

| 3  | 91123      |   150   |   1     |

```

But for some there are two rows:

```

| 1  | 123123     |   100   |   1     |
| 2  | 123123     |   200   |  d845f  |

```

I perform selecting with something like 

```

SELECT * FROM table WHERE `group` IN (1, 'd845f') 

```

where `1` and `d845f` are set parameters I specify in PHP.  

So there is always one row with `group = 1`, but there can optionally be second row like in example above with group `'d845f'` from my IN option.  

So when I have two rows I would like MySQL to only show one of them: the one with `'d845f'`.  

So how do I do it?  

I would like to get all the products with `group = 1` parameter, but when `group = 'd845f'` I would like to get only one row: with `group = 'd845f'`.  

I also would like to do it without nested SELECTs (JOINS are allowed).
Thanks!