If you pinch to zoom or use the slider, then you are always doing a digital zoom. The lenses do not move to zoom optically like a traditional camera.
The 0.5x, 1x, and 3x corresponds to each of the three lenses and those would be optical, but even then, there is no guarantee that you are actually using that lens/optical zoom. If you select 3x, the phone could actually be doing a 3x digital zoom from the 1x lens depending on your lighting conditions (or even a 6x digital zoom from the 0.5x lens, though that might be more rare). Same goes for 1x, it could be 2x digital zoom from the 0.5x lens. The only way you can tell is by looking at the photo metadata after taking the picture and seeing which lens it used and the focal length numbers.
Here is an example from my old XS (has a 1x and 2x lens). I had the 2x zoom selected, which corresponds to the telephoto lens, but it took the picture using the 1x lens (it says "Wide Camera" instead of "Telephoto Camera") and digitally zoomed in two times (focal length of the lens is 26mm, but the picture was taken using 52mm).
Here's what it looks like when it did the 2x zoom optically. It used the Telephoto Camera (2x lens), and the two focal length numbers are the same (no digital zoom).