Maybe define it like this:
create function GetAge( @PersonID int )
returns int
as
begin
declare @age int
select @age =
CASE
WHEN dateadd(year, datediff (year, i.DATE_OF_BIRTH, getdate()), i.DATE_OF_BIRTH) > getdate()
THEN datediff(year, i.DATE_OF_BIRTH, getdate()) - 1
ELSE datediff(year, i.DATE_OF_BIRTH, getdate())
END
from Person i
where PersonID = @PersonID
return @age
end
It returns the age, but does not reveal the date of birth.