In the current design of superconducting qubit based on circuit QED architecture, it can be rather challenging to place the resonant frequencies of all the qubits in “strongly dispersive” regime as the number of qubit increases for a practical purpose in future. Hence, we need to understand the qubit-photon interaction and its effect on the coherence of the qubit as the resonant frequency of a qubit approaches that of the cavity photon. In KRISS, we have made a series of measurements on a frequency-tunable transmon qubit embedded in a three dimensional cavity. As we tune the resonant frequency of the qubit towards that of the cavity, not only the diminishing of the coherence due to well-known Purcell effect near the resonance, but also a strong dependence of the coherence over a large range of frequency has been observed.