Most people when you ask this question, highly likely they wont be able to give a straight answer.
If this is the first time you are asking yourself the question, i bet 99% of us will not have a concrete answer. Even if one has an answer, he will either have a tiny doubt over or he hasn't got a clue of what he is answering.
There are 4 category of people :
A. Those who know what they kow
B. Those who know what they dont know
C. Those who dont know what they know
D. Those who dont know what they dont know
Those in category A, will give a simple and direct 'Yes' or 'No' to the question. They normally know what they want, what drives them to keep moving forward, what it takes to achieve their target and humbly yet brave enough to commit a 'No' if they are not ready for the challenge. However, some of them will even say 'Yes' even if they are not ready because they know they can achieve something by having certain strategies to nail the objective. Not many people are in this category.
Those in category B, these are the risk averse people. Most of them will not proceed or take up a challenge if they havent covered all angles needed for them to achieve the target. They will practise, train, simulate, have contingency plan, analyse time and time again, just to be sure that they will know whatever they dont know before. People in this category will take some time before giving a 'Yes' or 'No' answer.
Those in category C, normally they tend to under rate or over rate themselves. Those with self-confidence complexity tend to under rate themselves even though people around him have seen their potential and the success within their reach. They need people around him - friends, loved ones, coached etc to keep telling them of their true ability and how far they can go. Normally, they will take a long time to think of the answer or not answerning at all. However, there are also people in this category whom had over rated themselves and due to their perceived self-confidence, they tend to take up the challenge without knowing that they will fall hard on the ground. It not a question whether 'you never know if you never try' rather it is a case of trying insensibly just a like me being a matador without knowing what it means. These people will give a 'Yes' answer faster than those i Category A.
Last but not least, those is category D, is the most dangerous position you want to be. Clueless. Blur. Oblivious. Sometimes brainless. Can be cocky and arrogant at times. et cetera. These people will never know the answer to the question.
Back to the question, regardless of which category you are in - the one element that will make you achieve what you want is passion. Passion will drive you towards your goal. Being passionate of what you are doing will eventually change you to be in Category A.
Hence, to answer the question - tell yourself that you CAN. Repeat it again and again.
Eventually, whether you believe it or not - you will CAN.