Here's a solution that's based on a technique that I learned from the book "The LaTeX Companion" (2nd ed.). It executes \renewcommand\thesubsection{\arabic{subsection}} to reset the representation of the subsection counter, and it makes use of the low-level LaTeX command \subsection@cntformat, which governs how the subsection counter is displayed in subsection-level entries.
This solution is, by design, compatible with the hyperref and cleveref packages and their cross-referencing macros, e.g., \autoref, \cref, and \labelcref.
Addendum 2019/08/08: I've added two lines to the code to generalize the solution to handle subsubsection-level headers as well.

\documentclass{article}
\usepackage{geometry} % optional
\renewcommand\thesubsection{\arabic{subsection}}
\renewcommand\thesubsubsection{\arabic{subsubsection}}
% Method proposed in "The LaTeX Companion", 2nd ed.:
\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname the#1\endcsname\space}% default
{\csname #1@cntformat\endcsname}}% enable individual control
\def\subsection@cntformat{\thesection.\thesubsection\space}
\def\subsubsection@cntformat{\thesection.\thesubsection.\thesubsubsection\space}
\makeatother
%Optional:
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[noabbrev,nameinlink]{cleveref}
\crefname{subsection}{subsection}{subsections}
\crefname{subsubsection}{subsubsection}{subsubsections}
\begin{document}
\setlength\parindent{0pt} % just for this example
The instructions \verb+\ref{sec:C2}+ and \verb+\labelcref{sec:C2}+ return ``\ref{sec:C2}'' and ``\labelcref{sec:C2}''.
The instructions \verb+\ref{sec:C11}+ and \verb+\labelcref{sec:C11}+ return ``\ref{sec:C11}'' and ``\labelcref{sec:C11}''.
\verb+\autoref+: \autoref{sec:C2} and \autoref{sec:C11}
And \verb+\cref+: \cref{sec:C2,sec:C11}
\addtocounter{section}{2} % just for this example
\section{Section C}
\subsection{Subsection 1}
\subsubsection{Subsubsection 1} \label{sec:C11}
\subsection{Subsection 2} \label{sec:C2}
\end{document}
1.2if the reference occures in section 3 but points to a subsection of section1? – leandriis Aug 07 '19 at 19:26\autorefof thehyperrefpackage and\crefof thecleverefpackage. The answer given below does not suffer from this issue. – Mico Aug 08 '19 at 05:05