Okay, Just so we are very clear, below is the code you are using right?
@echo off
:Menu
cls
echo 1 Perform a self Ping Test
echo 2 Enter a IP to Ping
echo 3 Exit
echo.
set /p ans=
if "%ans%"=="1" (
ping 127.0.0.1
pause
goto Menu
)
if "%ans%"=="2" (
set /p ip=IP:
ping %ip%
pause
goto Menu
)
if "%ans%"=="3" (exit)
goto Menu