  We use a subdiffusion equation with fractional Caputo time derivative with
respect to another function $g$ ($g$--subdiffusion equation) to describe a
smooth transition from ordinary subdiffusion to superdiffusion. Ordinary
subdiffusion is described by the equation with the ``ordinary'' fractional
Caputo time derivative, superdiffusion is described by the equation with a
fractional Riesz type spatial derivative. We find the function $g$ for which
the solution (Green's function, GF) to the $g$--subdiffusion equation takes the
form of GF for ordinary subdiffusion in the limit of small time and GF for
superdiffusion in the limit of long time. To solve the $g$--subdiffusion
equation we use the $g$--Laplace transform method. It is shown that the scaling
properties of the GF for $g$--subdiffusion and the GF for superdiffusion are
the same in the long time limit. We conclude that for a sufficiently long time
the $g$--subdiffusion equation describes superdiffusion well, despite a
different stochastic interpretation of the processes. Then, paradoxically, a
subdiffusion equation with a fractional time derivative describes
superdiffusion. The superdiffusive effect is achieved here not by making
anomalously long jumps by a diffusing particle, but by greatly increasing the
particle jump frequency which is derived by means of the $g$--continuous time
random walk model. The $g$--subdiffusion equation is shown to be quite general,
it can be used in modeling of processes in which a kind of diffusion change
continuously over time. In addition, some methods used in modeling of ordinary
subdiffusion processes, such as the derivation of local boundary conditions at
a thin partially permeable membrane, can be used to model $g$--subdiffusion
processes, even if this process is interpreted as superdiffusion.
