probably not as there is usually only live & switch line, no neutral.
Switch line may not have been marked as such but don't be fooled by colour!
If only one cable with just 2 wires (+earth) then no-go!
must connect to light fitting or power via FCU or plug into local socket.