Following the answer by @user98602, you could use as example a piecewise version of the function $\frac{1}{1+\exp((2x-1)/(x^2-x))}$, which details could be found in this question I did:
$$r(x)=\dfrac{1}{1+\exp\left(\dfrac{2x-1}{x^2-x}\right)\dfrac{\left(1+\text{sgn}(1-x)\right)}{\left(1+\text{sgn}(x)\right)}}$$
will make the trick, in principle. But caution must be taken since as could be seen the function $r(x)$ is undefined at the points $x=\{0,\ 1\}$ (something similar happened in this question), so to keep smoothness a piecewise definition is mandatory:
$$q(x)=\begin{cases}0,\quad x\leq 0\\ 1,\quad x\geq 1\\ \dfrac{1}{1+\exp\left(\dfrac{2x-1}{x^2-x}\right)},\ \text{otherwise} \end{cases}$$
Also be aware that since this function behave as flat function so by its nature is an example of non-analytic smooth functions, as also are smooth bump functions (this is why I edit one of your original tags).
You could see these functions in Desmos:
