This is a crude example but should give you some idea of what you need to do:
// whitelist of column names which can be accepted via user input
$column_whitelist = ['col1', 'col2', 'col3'];
if (!in_array($_GET['col_name'], $column_whitelist)) {
// do your error handling
} else {
$ii = $_GET['col_name'];
// prepare your SQL query
$stmt = $pdo->prepare("UPDATE nota SET `$ii` = ? WHERE id = ?");
// pass in the variables to be bound to the placeholders in
// the query and execute it
$stmt->execute([$nom_aux, $id]);
}
or you could provide the user with a select element to choose the column they are searching:
<select name="col_name">
<option value="1">col 1</option>
<option value="2">col 2</option>
<option value="3">col 3</option>
</select>
and then in your PHP do something like:
$column_whitelist = [
1 => 'my_table_col_1',
2 => 'my_table_col_2',
3 => 'my_table_col_3'
];
if (isset($column_whitelist[(int)$_GET['col_name']])) {
$ii = $column_whitelist[(int)$_GET['col_name']];
// prepare your SQL query
$stmt = $pdo->prepare("UPDATE nota SET `$ii` = ? WHERE id = ?");
// and so on
}