Maybe this will help answer your question:
When I saw the title of your post, 'What did you come by?', I had absolutely no idea what your question was about. My first thought was that you were asking about the phrasal verb 'to come by [something]', meaning to find or get hold of something. Without further context, I had no idea that you were trying to enquire about means of transport. In other words, 'What did you come by?' really doesn't mean anything.
Just take everyone's advice and ask 'How did you get here?'.