Get/ Create Table

The problem statement: I have a table with some values (Value a, value b) If value ‘a’ exists, i need to get the information from the row (ie. show values a, and b) If value ‘a’ does not exist, i need to create a row to insert value ‘a’ and value ‘b’
How do i do this? I tried a few iterations, I am unable to do it properly. Please help

Hello.
Welcome to the community.

I do not understand where do you take your data from?
Say a do not exist. What value should a take?

I have modified the problem. There is a table with a single column. I am writing a stored procedure to obtain a value from the user (Call the obtained value ‘a’). I Have to check if the entered value ‘a’ exists in the table. If it does, i have to return the value from the table. If it does not exist, i have to update the table with the value entered by the user (which is ‘a’).

Basically, if ‘a’ exists in the table, return the value. If it doesnt exist, update the table.
(I am thinking i can add other columns in the table later as I am only checking for the values in this particular column)