If www.example.com has a CNAME pointing to example.com, any query for www.example.com will be resolved using the IP address associated with example.com.
If www.example.com has a CNAME pointing to example.com, any query for www.example.com will be resolved using the IP address associated with example.com.