This can be done using the OFFSET function. Here is a Google Sheets documentation about OFFSET.
https://support.google.com/docs/answer/3093379?hl=en
Syntax: OFFSET(cell_reference, offset_rows, offset_columns, [height], [width])
cell_reference - The starting point from which to count the offset rows and columns.
offset_rows - The number of rows to shift by.
- offset_rows must be an integer, but may be negative. If a decimal value is provided, the decimal part will be truncated.
offset_columns - The number of columns to shift by.
- offset_columns must be an integer, but may be negative. If a decimal value is provided, the decimal part will be truncated.
height - [OPTIONAL] - The height of the range to return starting at the offset target.
width - [OPTIONAL] - The width of the range to return starting at the offset target.
Here is an example:
+---+----+----+----+----+----+
| | B | C | D | E | F |
+---+----+----+----+----+----+
| 2 | 2 | 4 | 6 | 8 | 10 |
+---+----+----+----+----+----+
| 3 | 12 | 14 | 16 | 18 | 20 |
+---+----+----+----+----+----+
| 4 | 22 | 24 | 26 | 28 | 30 |
+---+----+----+----+----+----+
| 5 | 32 | 34 | 36 | 38 | 40 |
+---+----+----+----+----+----+
| 6 | 42 | 44 | 46 | 48 | 50 |
+---+----+----+----+----+----+
| 7 | 52 | 54 | 56 | 58 | 60 |
+---+----+----+----+----+----+
Reference Cell: D4
+---------------------+----+
| `=OFFSET(D4,-2,-2)` | 2 |
| `=OFFSET(D4,-2,-1)` | 4 |
| `=OFFSET(D4,-2,0)` | 6 |
| `=OFFSET(D4,-1,-2)` | 12 |
| `=OFFSET(D4,-1,-1)` | 14 |
| `=OFFSET(D4,-1,0)` | 16 |
| `=OFFSET(D4,0,-2)` | 22 |
| `=OFFSET(D4,0,-1)` | 24 |
| `=OFFSET(D4,0,0)` | 26 |
| `=OFFSET(D4,0,1)` | 28 |
| `=OFFSET(D4,0,2)` | 30 |
| `=OFFSET(D4,1,-2)` | 32 |
| `=OFFSET(D4,1,-1)` | 34 |
| `=OFFSET(D4,1,0)` | 36 |
| `=OFFSET(D4,1,1)` | 38 |
| `=OFFSET(D4,1,2)` | 40 |
| `=OFFSET(D4,2,-2)` | 42 |
| `=OFFSET(D4,2,-1)` | 44 |
| `=OFFSET(D4,2,0)` | 46 |
| `=OFFSET(D4,2,1)` | 48 |
| `=OFFSET(D4,2,2)` | 50 |
+---------------------+----+