What is the connection between "replay attack" to CCA security?
These are different - protection against a replay attack could for example be done by recording that a message was already handled or by including a timestamp in the message and not processing the message if it is too old. 

Note that for a replay attack the attacker doesn't get the plaintext, but does get access to at least 1 previously sent message. In CCA the attacker doesn't not have access to previously sent messages, and can request back the plaintext for chosen ciphertexts.