A sentence that asks for an answer is called an sentence.
To turn "You can swim." into a question move the word to the front.