Add parameters conditional for select queries