Question: > 
> How do you like your coffee?
> 
> 
> 

Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good?

When the latter is possible, can next both answers be possible? 

1. I like it a lot.
2. It's good.

Answer: 
You may use this in both situations, and indeed in others; the context will make it clear which meaning is intended:

* If you ask before you start preparing the coffee, you are asking how your hearer prefers their coffee to be prepared—Do you like it strong or weak (or possibly boiled to a black sludge)?
* If you ask before or as you serve the coffee, you are asking how your hearer 'takes' their coffee—Do you want cream or sugar with your coffee?
* If you ask after your hearer has started drinking the coffee, you are asking about the taste of the coffee—Is the coffee OK?

As for your answers, both are possible, as are many more: 

* It's terrific!
* It's horrible!
* It's coffee!
* It's Blue Mountain, apparently from St Thomas Parish; rather underroasted, to my mind, and a coarser grind should be used with that press.
It's easier to see the meaning if you expand the two sentences to avoid the ambiguity:

> 
> How do you like your coffee [to be]?
> 
> 
> 

And the second definition:

> 
> How do you like your coffee [in front of you]?
> 
> 
> 

---

The latter is usually instead said without the "how" (in fact, I have a feeling including the "how" is grammatically incorrect), just as:

> 
> *Do you like your coffee?*
> 
> 
> 

Or even more clear: 

> 
> *How is your coffee?*
> 
> 
>