You can create a proc using OUTPUT
CREATE PROCEDURE myProc
@Email VARCHAR(100),
@fromdate DATETIME,
@todate DATETIME,
@name VARCHAR(100) OUTPUT,
@address VARCHAR(100) OUTPUT
AS
select TOP 1
@name = name,
@address = address
from Attendance_Master
where OffEmail=@Email
and
LoginTime between @fromdate and @todate
This is how you can use the proc
DECLARE @name VARCHAR(100)
DECLARE @address VARCHAR(100)
EXEC myProc @Email='email@email.com',@fromdate='2011-01-01',@todate='2011-01-31', @name = @name OUTPUT, @address = @address OUTPUT
PRINT @name
PRINT @address