Do you want to ask which stentence is correct? The second one is correct because an interrogative sentence normally takes an inversion form of the operator and the subject. As for the first sentence, it should be used as a clause, for example, I would like to know how I can help you.
Hope this helps.