expression
in that manner; like that; that way
A set phrase meaning 'in that way' or 'like that', often used to describe how something is done or happens. It can refer back to a previously mentioned manner or state.
彼はいつもそんな具合に話す。
He always talks in that manner.
そんな具合にやれば、うまくいくよ。
If you do it like that, it'll go well.
Interrogative form meaning 'in what manner' or 'how'.
A fixed expression composed of そんな (sonna, 'that kind of') + 具合 (guai, 'condition; state; manner') + に (ni, adverbial particle). The exact historical derivation is straightforward; it is a common pattern in Japanese.