Hello, cat12, and welcome to the Grammar Exchange.
Who knows what else would have changed if you stayed?
Who knows what else would have changed if you had stayed?
Who knows what else would have changed had you stayed?
This question, with "would have changed," utilizes a counterfactual past conditional. This type of conditional requires the past perfect in the "if"-clause. Thus, your second and third examples, with the past perfect, are correct; and the first example, with the simple past, is incorrect. The third sentence uses conditional inversion with the past perfect ("had you stayed") instead of an "if"-clause ("if you had stayed"), but they mean the same thing.