I wanna get max value of each rows, not max value of a field.
For example, when I have a sample\_table like this:

**sample\_table**

```
|col1|col2|col3|
|--------------|
| 1  | 0  | 0  |
| 0  | 2  | 0  |
| 2  | 0  | 0  |
| 0  | 0  | 3  |

```

And the query and result I want is something like this:

**query**

```
SELECT SOME_GET_MAX_VAL_FUNC(col1, col2, col3) AS max_val FROM sample_table;

```

**result**

```
|max_val|
|-------|
|   1   |
|   2   |
|   2   |
|   3   |

```

I want some solution to replace `SOME_GET_MAX_VAL_FUNC` .
If it is nearly impossible in SQL, why is it? (I'm new to SQL and BigQuery)

**note**

* The number of `col`s maybe very big, like `col1, col2, ... col200` .
So the solution of using `CASE` would be hard to me. [SQL MAX of multiple columns?](https://stackoverflow.com/questions/71022/sql-max-of-multiple-columns)
* Particularly, the rest columns other than the max value are equal to `0`.