This is essentially an omission of a word, in this case being the verb following the particle. This is common in speech as answers to questions, and often involves omission of the main verb of a sentence.
どこにいる?
友達の家に(いる。)
誰が勝ったか?
俺が(勝った。)
何語で話しかけられた?
英語で(話しかけられた。)
It is also common, in speech, to add a similar clause after the verb has been spoken. This can be done for clarification. This pattern does not require the sentence to be an answer to a question and can just be added by the speaker in anticipation of the listener not getting the full picture.
A: 登録しました。
B: (何を?)
A: 名前を
B: (どこに?)
A: データベースに
B: (何で?)
A: SQLクエリーで