I found this problem on Facebook from a Mathematics group. Apparently it had appeared as one of the problems on a college entrance exam.
The person who shared it on Facebook did not disclose the correct answer. I'm going to post my own approach below, please let me know if my answer is correct or if there are any other methods possible. (I even encourage solutions that may typically go beyond pre-college level mathematics.)


If you reflect $B$ about $D$ to $B'$, then $\triangle DB'A$ is congruent to $\triangle DBC$:
$$\begin{align*} DB' &= DB &&\text{By construction}\\ \angle ADB' &= \angle CDB &&\text{Vertically opposite angles}\\ DA &= DC &&\text{Given}\\ \triangle DB'A &\cong \triangle DBC &&\text{SAS} \end{align*}$$
In particular, $AB' = BC = 2$, and $\angle DB'A = \angle DBC = 60^\circ$.
Consider $\triangle ABB'$, by the sine law,
$$\begin{align*} \frac{AB}{\sin \angle AB'B} &= \frac{AB'}{\sin \angle ABB'}\\ \frac{AB}{\sin 60^\circ} &= \frac{2}{\sin 45^\circ}\\ AB &= \frac{\sqrt 3}{2} \cdot \frac{2}{1/\sqrt2} = \sqrt 6 \end{align*}$$