[question word] … [verb (plain)] + かは + [noun] + によって違う [verb (plain)] + かどうかは + [noun] + によって違う [i-adj] + かどうかは + [noun] + によって違う [na-adj] + かどうかは + [noun] + によって違う [noun] + かどうかは + [noun] + によって違う
~かは~によって違う says that the answer to a question changes from one case to the next: "what/how/whether … depends on …". The question goes first as a clause ending in か, は makes it the topic, and によってちがう違う names what it varies with.
The question clause is in the plain form: polite です and ます don't go inside it.
With a question word – なん何, どこ, いつ, いくら, どのくらい – the clause ends in plain か. Without one, it is a yes/no question and ends in かどうか, which a noun or a な-adjective takes without だ: ×学生だかどうか.
によって違う says the outcome is different for each value of the factor – each shop, each person, each season. しだい次第だ says the factor decides the outcome, and fits a single result that hangs on effort or a choice.
These go beyond the spoken form with 違う.